{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"prefixCls\", \"disabled\", \"visible\", \"children\", \"popupElement\", \"containerWidth\", \"animation\", \"transitionName\", \"dropdownStyle\", \"dropdownClassName\", \"direction\", \"placement\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"getPopupContainer\", \"empty\", \"getTriggerDOMNode\", \"onPopupVisibleChange\", \"onPopupMouseEnter\"];\nimport * as React from 'react';\nimport Trigger from 'rc-trigger';\nimport classNames from 'classnames';\nvar getBuiltInPlacements = function getBuiltInPlacements(dropdownMatchSelectWidth) {\n  // Enable horizontal overflow auto-adjustment when a custom dropdown width is provided\n  var adjustX = dropdownMatchSelectWidth === true ? 0 : 1;\n  return {\n    bottomLeft: {\n      points: ['tl', 'bl'],\n      offset: [0, 4],\n      overflow: {\n        adjustX: adjustX,\n        adjustY: 1\n      }\n    },\n    bottomRight: {\n      points: ['tr', 'br'],\n      offset: [0, 4],\n      overflow: {\n        adjustX: adjustX,\n        adjustY: 1\n      }\n    },\n    topLeft: {\n      points: ['bl', 'tl'],\n      offset: [0, -4],\n      overflow: {\n        adjustX: adjustX,\n        adjustY: 1\n      }\n    },\n    topRight: {\n      points: ['br', 'tr'],\n      offset: [0, -4],\n      overflow: {\n        adjustX: adjustX,\n        adjustY: 1\n      }\n    }\n  };\n};\nvar SelectTrigger = function SelectTrigger(props, ref) {\n  var prefixCls = props.prefixCls,\n    disabled = props.disabled,\n    visible = props.visible,\n    children = props.children,\n    popupElement = props.popupElement,\n    containerWidth = props.containerWidth,\n    animation = props.animation,\n    transitionName = props.transitionName,\n    dropdownStyle = props.dropdownStyle,\n    dropdownClassName = props.dropdownClassName,\n    _props$direction = props.direction,\n    direction = _props$direction === void 0 ? 'ltr' : _props$direction,\n    placement = props.placement,\n    dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n    dropdownRender = props.dropdownRender,\n    dropdownAlign = props.dropdownAlign,\n    getPopupContainer = props.getPopupContainer,\n    empty = props.empty,\n    getTriggerDOMNode = props.getTriggerDOMNode,\n    onPopupVisibleChange = props.onPopupVisibleChange,\n    onPopupMouseEnter = props.onPopupMouseEnter,\n    restProps = _objectWithoutProperties(props, _excluded);\n  var dropdownPrefixCls = \"\".concat(prefixCls, \"-dropdown\");\n  var popupNode = popupElement;\n  if (dropdownRender) {\n    popupNode = dropdownRender(popupElement);\n  }\n  var builtInPlacements = React.useMemo(function () {\n    return getBuiltInPlacements(dropdownMatchSelectWidth);\n  }, [dropdownMatchSelectWidth]); // ===================== Motion ======================\n\n  var mergedTransitionName = animation ? \"\".concat(dropdownPrefixCls, \"-\").concat(animation) : transitionName; // ======================= Ref =======================\n\n  var popupRef = React.useRef(null);\n  React.useImperativeHandle(ref, function () {\n    return {\n      getPopupElement: function getPopupElement() {\n        return popupRef.current;\n      }\n    };\n  });\n  var popupStyle = _objectSpread({\n    minWidth: containerWidth\n  }, dropdownStyle);\n  if (typeof dropdownMatchSelectWidth === 'number') {\n    popupStyle.width = dropdownMatchSelectWidth;\n  } else if (dropdownMatchSelectWidth) {\n    popupStyle.width = containerWidth;\n  }\n  return /*#__PURE__*/React.createElement(Trigger, _extends({}, restProps, {\n    showAction: onPopupVisibleChange ? ['click'] : [],\n    hideAction: onPopupVisibleChange ? ['click'] : [],\n    popupPlacement: placement || (direction === 'rtl' ? 'bottomRight' : 'bottomLeft'),\n    builtinPlacements: builtInPlacements,\n    prefixCls: dropdownPrefixCls,\n    popupTransitionName: mergedTransitionName,\n    popup: /*#__PURE__*/React.createElement(\"div\", {\n      ref: popupRef,\n      onMouseEnter: onPopupMouseEnter\n    }, popupNode),\n    popupAlign: dropdownAlign,\n    popupVisible: visible,\n    getPopupContainer: getPopupContainer,\n    popupClassName: classNames(dropdownClassName, _defineProperty({}, \"\".concat(dropdownPrefixCls, \"-empty\"), empty)),\n    popupStyle: popupStyle,\n    getTriggerDOMNode: getTriggerDOMNode,\n    onPopupVisibleChange: onPopupVisibleChange\n  }), children);\n};\nvar RefSelectTrigger = /*#__PURE__*/React.forwardRef(SelectTrigger);\nRefSelectTrigger.displayName = 'SelectTrigger';\nexport default RefSelectTrigger;","map":{"version":3,"names":["_extends","_defineProperty","_objectSpread","_objectWithoutProperties","_excluded","React","Trigger","classNames","getBuiltInPlacements","dropdownMatchSelectWidth","adjustX","bottomLeft","points","offset","overflow","adjustY","bottomRight","topLeft","topRight","SelectTrigger","props","ref","prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","_props$direction","direction","placement","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter","restProps","dropdownPrefixCls","concat","popupNode","builtInPlacements","useMemo","mergedTransitionName","popupRef","useRef","useImperativeHandle","getPopupElement","current","popupStyle","minWidth","width","createElement","showAction","hideAction","popupPlacement","builtinPlacements","popupTransitionName","popup","onMouseEnter","popupAlign","popupVisible","popupClassName","RefSelectTrigger","forwardRef","displayName"],"sources":["/data/messenger.client/node_modules/rc-select/es/SelectTrigger.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"prefixCls\", \"disabled\", \"visible\", \"children\", \"popupElement\", \"containerWidth\", \"animation\", \"transitionName\", \"dropdownStyle\", \"dropdownClassName\", \"direction\", \"placement\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"getPopupContainer\", \"empty\", \"getTriggerDOMNode\", \"onPopupVisibleChange\", \"onPopupMouseEnter\"];\nimport * as React from 'react';\nimport Trigger from 'rc-trigger';\nimport classNames from 'classnames';\n\nvar getBuiltInPlacements = function getBuiltInPlacements(dropdownMatchSelectWidth) {\n  // Enable horizontal overflow auto-adjustment when a custom dropdown width is provided\n  var adjustX = dropdownMatchSelectWidth === true ? 0 : 1;\n  return {\n    bottomLeft: {\n      points: ['tl', 'bl'],\n      offset: [0, 4],\n      overflow: {\n        adjustX: adjustX,\n        adjustY: 1\n      }\n    },\n    bottomRight: {\n      points: ['tr', 'br'],\n      offset: [0, 4],\n      overflow: {\n        adjustX: adjustX,\n        adjustY: 1\n      }\n    },\n    topLeft: {\n      points: ['bl', 'tl'],\n      offset: [0, -4],\n      overflow: {\n        adjustX: adjustX,\n        adjustY: 1\n      }\n    },\n    topRight: {\n      points: ['br', 'tr'],\n      offset: [0, -4],\n      overflow: {\n        adjustX: adjustX,\n        adjustY: 1\n      }\n    }\n  };\n};\n\nvar SelectTrigger = function SelectTrigger(props, ref) {\n  var prefixCls = props.prefixCls,\n      disabled = props.disabled,\n      visible = props.visible,\n      children = props.children,\n      popupElement = props.popupElement,\n      containerWidth = props.containerWidth,\n      animation = props.animation,\n      transitionName = props.transitionName,\n      dropdownStyle = props.dropdownStyle,\n      dropdownClassName = props.dropdownClassName,\n      _props$direction = props.direction,\n      direction = _props$direction === void 0 ? 'ltr' : _props$direction,\n      placement = props.placement,\n      dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n      dropdownRender = props.dropdownRender,\n      dropdownAlign = props.dropdownAlign,\n      getPopupContainer = props.getPopupContainer,\n      empty = props.empty,\n      getTriggerDOMNode = props.getTriggerDOMNode,\n      onPopupVisibleChange = props.onPopupVisibleChange,\n      onPopupMouseEnter = props.onPopupMouseEnter,\n      restProps = _objectWithoutProperties(props, _excluded);\n\n  var dropdownPrefixCls = \"\".concat(prefixCls, \"-dropdown\");\n  var popupNode = popupElement;\n\n  if (dropdownRender) {\n    popupNode = dropdownRender(popupElement);\n  }\n\n  var builtInPlacements = React.useMemo(function () {\n    return getBuiltInPlacements(dropdownMatchSelectWidth);\n  }, [dropdownMatchSelectWidth]); // ===================== Motion ======================\n\n  var mergedTransitionName = animation ? \"\".concat(dropdownPrefixCls, \"-\").concat(animation) : transitionName; // ======================= Ref =======================\n\n  var popupRef = React.useRef(null);\n  React.useImperativeHandle(ref, function () {\n    return {\n      getPopupElement: function getPopupElement() {\n        return popupRef.current;\n      }\n    };\n  });\n\n  var popupStyle = _objectSpread({\n    minWidth: containerWidth\n  }, dropdownStyle);\n\n  if (typeof dropdownMatchSelectWidth === 'number') {\n    popupStyle.width = dropdownMatchSelectWidth;\n  } else if (dropdownMatchSelectWidth) {\n    popupStyle.width = containerWidth;\n  }\n\n  return /*#__PURE__*/React.createElement(Trigger, _extends({}, restProps, {\n    showAction: onPopupVisibleChange ? ['click'] : [],\n    hideAction: onPopupVisibleChange ? ['click'] : [],\n    popupPlacement: placement || (direction === 'rtl' ? 'bottomRight' : 'bottomLeft'),\n    builtinPlacements: builtInPlacements,\n    prefixCls: dropdownPrefixCls,\n    popupTransitionName: mergedTransitionName,\n    popup: /*#__PURE__*/React.createElement(\"div\", {\n      ref: popupRef,\n      onMouseEnter: onPopupMouseEnter\n    }, popupNode),\n    popupAlign: dropdownAlign,\n    popupVisible: visible,\n    getPopupContainer: getPopupContainer,\n    popupClassName: classNames(dropdownClassName, _defineProperty({}, \"\".concat(dropdownPrefixCls, \"-empty\"), empty)),\n    popupStyle: popupStyle,\n    getTriggerDOMNode: getTriggerDOMNode,\n    onPopupVisibleChange: onPopupVisibleChange\n  }), children);\n};\n\nvar RefSelectTrigger = /*#__PURE__*/React.forwardRef(SelectTrigger);\nRefSelectTrigger.displayName = 'SelectTrigger';\nexport default RefSelectTrigger;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,wBAAwB,MAAM,oDAAoD;AACzF,IAAIC,SA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